import request from '@/utils/request'

// 查询小区管理列表
export function listArea(query) {
  return request({
    url: '/house/area/list',
    method: 'get',
    params: query
  })
}

// 查询小区管理详细
export function getArea(areaId) {
  return request({
    url: '/house/area/' + areaId,
    method: 'get'
  })
}

// 新增小区管理
export function addArea(data) {
  return request({
    url: '/house/area',
    method: 'post',
    data: data
  })
}

// 修改小区管理
export function updateArea(data) {
  return request({
    url: '/house/area',
    method: 'put',
    data: data
  })
}

// 删除小区管理
export function delArea(areaId) {
  return request({
    url: '/house/area/' + areaId,
    method: 'delete'
  })
}

// 获取社区
export function getCommitteeId() {
  return request({
    url: '/house/area/getCommitteeList',
    method: 'get'
  })
}

// 获取社区
export function getEstateId() {
  return request({
    url: '/other/estate/list',
    method: 'get'
  })
}

// 获取社区
export function getStreetId() {
  return request({
    url: '/other/street/list',
    method: 'get'
  })
}

// 获取社区
export function getCommunityId() {
  return request({
    url: '/other/community/list',
    method: 'get'
  })
}

// 获取社区
export function getPropertyId() {
  return request({
    url: '/other/property/list',
    method: 'get'
  })
}


// 获取小区信息
export function getAreaInfo() {
  return request({
    url: '/house/area/list1',
    method: 'get'
  })
}

// 获取小区信息
export function getAreaInfo1(areaName) {
  return request({
    url: '/house/area/list2/'+areaName,
    method: 'get'
  })
}

export function moveArea(data) {
  return request({
    url: '/house/area/moveArea',
    method: 'put',
    data: data
  })
}
